/**
 * jims
 */
package com.jims.master.modules.base.inquiry.dao;
import com.jims.master.common.persistence.CrudDao;
import com.jims.master.common.persistence.annotation.MyBatisDao;
import com.jims.master.modules.base.inquiry.entity.InquiryAsk;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 问诊DAO接口
 * @author chent
 * @version 2017-05-12
 */
@MyBatisDao
public interface InquiryAskDao extends CrudDao<InquiryAsk> {
    /**
     * 医生的问诊列表
     * @param doctor
     * @author chent
     * @return
     */
    public List<InquiryAsk> getInquiryAskList(@Param("doctor")String doctor,@Param("conntFlag")String conntFlag,@Param("startPage")int startPage);

    /**
     * 病人咨询详情
     * @param id
     * @author chent
     * @return
     */
    public List<InquiryAsk> personAllAsk(@Param("id")String id,@Param("conntFlag")String conntFlag,@Param("startPage")int startPage);

    /**
     * 用户咨询历史记录
     * @param personId
     * @author chent
     * @return
     */
    public List<InquiryAsk> inquiryListByUser(@Param("personId")String personId);

    /**
     * 我的问诊记录
     * @param
     * @author chent
     * @return
     */
    public List<InquiryAsk> getInquiryAskListbyPerson(InquiryAsk inquiryAsk);

    /**
     * 医生端问诊记录
     * @author chent
     * @return
     */
    public List<InquiryAsk> doctorNotInquiryAsk(InquiryAsk inquiryAsk);

    /**
     * 医生端问诊历史记录
     * @author chent
     * @return
     */
    public List<InquiryAsk> doctorInquiryAsk(InquiryAsk inquiryAsk);

    /**
     * 得到用户问题及追问的ID
     * @param inquiryAsk
     * @return
     */
    public List<InquiryAsk> getId(InquiryAsk inquiryAsk);


    /*public int updateDoctor(InquiryAsk inquiryAsk);*/

    /**
     * 在线咨询没有问诊医生
     * @author chent
     * @return
     */
    public List<InquiryAsk> allInquiryAsk();

    /**
     * 医生端问诊量
     * @author chent
     * @return
     */
    public String getCountByDocId(@Param("personId")String personId);

    /**
     * 检查医生是否已经领取该问题
     * @param acceptAskId
     * @param doctor
     * @author chent
     * @return
     */
    public InquiryAsk getAcceptId(@Param("acceptAskId")String acceptAskId,@Param("doctor")String doctor);

    /**
     * 医生问诊记录详情
     * @author chent
     * @return
     */
    public List<InquiryAsk> doctorInquiryDetail(InquiryAsk inquiryAsk);

    /**
     * 修改医生已读状态
     * @param inquiryAsk
     * @return
     */
    public int updateReadState(InquiryAsk inquiryAsk);

    /**
     * 医生未读条数
     * @param id
     * @return
     */
    public String notReadNum(@Param("id")String id);


}